﻿using Harmontronics.Model.Dto.Role;
using Harmontronics.Model.Entitys;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Harmontronics.IService
{
    public interface IRoleService
    {
        RoleRes GetRoleById(int id);
        UserRoleRelation GetRelationByUserId(int id);
        List<string> GetRoleDiscListByUserId(long userId);
        List<RoleReq> GetAllRoles();
        List<RoleReq> GetAliveRoles();
        bool Add(RoleAdd roleAdd);

        bool UpdateRole(RoleEdit roleEdit);
        bool UpdateRoleMenus(UpdateRoleMenuInput input);
        bool UpdateRoleEnable(UpdateRoleEnable update);
        bool UpdateUserRole(int userId, string roleName);
        bool UpdateUserRole(string employeeNumber, string roleName);
        bool UpdateUserRole(int userId, int? roleId);

        bool Del(int id);
        //批量删除
        bool BatchDel(List<int> ids);
    }
}
